package com.food.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.food.pojo.Comments;
import com.food.pojo.FoodsUsers;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author beixiang
 * @version 1.0
 * @description TODO
 * @date 2023/3/28 12:40
 */
@Mapper
@Repository
public interface FoodsUsersMapper extends BaseMapper<FoodsUsers> {
    Boolean updateIsCollectByFoodId(@Param("userId") Integer userId, @Param("foodId") Integer foodId, @Param("isFavorite") Integer isFavorite);

    Boolean insertHistoryRecord(@Param("userId") Integer userId, @Param("foodId") Integer foodId);

    int getHistoryRecord(Integer userId, Integer foodId);

}
